package com.ac.api.process_line.entity;

import com.ac.api.process_task.entity.ProcessTask;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="LineVo", description="生产线详情")
public class LineVo  implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "生产线编号")
    @TableId(value = "line_id", type = IdType.AUTO)
    private Integer lineId;


    @ApiModelProperty(value = "生产开始运行时间")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "生产线结束时间")
    @TableField(value = "end_time",updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime endTime;

    @ApiModelProperty(value = "生产线状态")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String status;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间/如更新型号才需要更新该属性")
    private LocalDateTime updatedAt;
    @ApiModelProperty(value = "产品型号（如LED灯型号）")
    private String productModel;
    @ApiModelProperty(value = "下属生产区")
    private List<ProcessTask> processTaskList;

    public LineVo(Integer lineId, LocalDateTime startTime, LocalDateTime endTime, String status, LocalDateTime createdAt, LocalDateTime updatedAt, String productModel, List<ProcessTask> processTaskList) {
        this.lineId = lineId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.status = status;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.productModel = productModel;
        this.processTaskList = processTaskList;
    }
}
